import contentData from './data'
const Mock = require('mockjs')
export default [
    //获取内容列表(Mock)
    {
        url: 'content/list',
        type: 'get',
        data: () => {
            return {
                code: 20000,
                /*
                * 99   审核通过
                * 0    退稿
                * 1-99 审核中
                * */
                data: Mock.mock({
                    "list|15": [
                        {
                            'id|+1': 0,                                           //id
                            'top|1': [0,1],                                       //置顶
                            title: '@ctitle(15, 40)',                             //标题
                            author: '@cname',                                     //作者
                            publish_time: '@date("yyyy-MM-dd")' + ' ' + '@time',  //发布时间
                            order: '宣传科',                                       //来源部门
                            word_count: '@integer(1000, 8000)',                   //字数
                            img_count: '@integer(0, 20)',                         //图片数
                            link_count: '@integer(0, 10)',                        //链接数
                            click_count: '@integer(1000, 2000)',                  //点击量
                            edit_time: '@date("yyyy-MM-dd")' + ' ' + '@time',     //编辑时间
                            'islink|1': [0,1]                                     //是否外链
                        }
                    ],
                    total: 112,
                })
            }
        }
    },
    {
        url: 'content/delete',
        type: 'delete',
        data: () => {
            return {
                code: 20000,
                message: 'success'
            }
        }
    },
    {
        url: 'content/top',
        type: 'post',
        data: () => {
            return {
                code: 20000,
                message: 'success'
            }
        }
    },
    // 获取素材库图片
    {
        url: 'content/getMaterial',
        type: 'get',
        data: () => {
            return {
                code: 20000,
                data: contentData.imgMaterial
            }
        }
    },
    // 上传地址更新
    {
        url: '/auth/system/getUploadUrl',
        type: 'get',
        data: () => {
            return{
                code: 20000,
                data:{
                    uploadUrl:"http://hms-localoss.foxtest.net/upload/4454AAECUVMABlFTA1RVVwBSUgFXUFBWUVEDBVIJUQwIBwQWVEoVXlpGBkYEJV4SAAFAB3dVXwcQA3BUXRURVXZEWlcUBSIHX1VEVHACWwEdQ1JzTF5FRAJ3S1pDHRFVdkRERBQFIhNAQhlGBCVEBgNDUnNASkJEAndBV0JAAyFPXUQVBnESFFYQFwJfD1AJAB9YUQFRU1UFDVIPA1MABAECBQgEUwJaAgYFV1VUBlAAXgcWQFNUEghBQ1pfBFBHAndbXl1bDwYVASIRVgtbFgBAElFAV0QMVEZYCwFDQwNBUUZdUEAKPFlbAARWW1wWERZAA3UXBCcQBnVeXRYZDlpXVVxeQRJNVlkZF1YVQEwLAxEVBnQEUQcGAgcAXBFQcwUAAgIHWVoHA08TXQESFhcHC0NSV0Q+RVpUCwFDVw1YREZVQkE+EFlMBF4BVgREBgkIQEZXRRJqRFZEUwBaFggDBBZCWxsGDQdRUQdW/"
                }
            }
        }
    },
    // 内容排序
    {
        url: '/content/listorder',
        type: 'post',
        data: () => {
            return {
                code: 20000,
                message: 'success'
            }
        }
    },
]
